﻿namespace Medianamik.Core.DAL.SQL
{
    public class NodePropertyValueTable : ITable
    {
        protected Table InnerTable { get; private set; }

        public NodePropertyValueTable(string pAlias)
        {
            InnerTable = new Table("vw_medianamik_NodeRevision", pAlias);
            InnerTable.AddColumn("NodeRevisionId");
            InnerTable.AddColumn("NodeId");
            InnerTable.AddColumn("CreatedOn");
            InnerTable.AddColumn("PublishedOn");
            InnerTable.AddColumn("Data");
        }

        public string Name
        {
            get { return InnerTable.Name; }
        }

        public string Alias
        {
            get { return InnerTable.Alias; }
        }

        public string Schema
        {
            get { return InnerTable.Schema; }
        }

        public Column this[string pColumnName]
        {
            get { return InnerTable[pColumnName]; }
        }

        public bool Contains(string pColumnName)
        {
            return InnerTable.Contains(pColumnName);
        }
    }
}
